﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once

#include "GcmpGUiBaseInterface.h"
#include <IControlDefinition.h>

namespace gcmp
{
    /// \brief 无绑定命令的控件数据定义
    class GCMP_GUI_BASE_INTERFACE_EXPORT IUnCommandControlDefinition : public IControlDefinition
    {
    public:
        /// \brief 阻塞或取消阻塞当前控件的自定义Handler运行
        /// 
        /// 调用该接口后， 会将Handler的阻塞状态设置为needBlock, 并返回之前状态
        ///
        /// \param needBlock  是否需要阻塞当前自定义Handler的运行
        /// \return 调用该接口之前Handler的阻塞状态
        virtual bool BlockControlHandler(bool needBlock) = 0;
    };
}

